package com.example.testapplication.Paging;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
import androidx.paging.LivePagedListBuilder;
import androidx.paging.PagedList;

public class IncomeViewModel extends ViewModel {
    private LiveData<PagedList<Income>> pagedListLiveData;

    public IncomeViewModel(){
        PagingDataSourceFactory pagingDataSourceFactory = new PagingDataSourceFactory();
        this.pagedListLiveData = new LivePagedListBuilder<Integer,Income>(pagingDataSourceFactory,10).build();
    }
    public LiveData<PagedList<Income>> getPagedListLiveData(){
        return pagedListLiveData;
    }
}
